Featherweight Java A Minimal Core Calculus for Java and GJ

نویسندگان

  • Atsushi Igarashi
  • Benjamin Pierce
  • Philip Wadler
چکیده

Several recent studies have introduced lightweight ver sions of Java reduced languages in which complex fea tures like threads and re ection are dropped to enable rigorous arguments about key properties such as type safety We carry this process a step further omitting almost all features of the full language including inter faces and even assignment to obtain a small calculus Featherweight Java for which rigorous proofs are not only possible but easy Featherweight Java bears a similar relation to full Java as the lambda calculus does to languages such as ML and Haskell It o ers a similar computational feel providing classes methods elds inheritance and dynamic typecasts with a semantics closely follow ing Java s A proof of type safety for Featherweight Java thus illustrates many of the interesting features of a safety proof for the full language while remaining pleasingly compact The syntax type rules and opera tional semantics of Featherweight Java t on one page making it easier to understand the consequences of ex tensions and variations As an illustration of its utility in this regard we extend Featherweight Java with generic classes in the style of GJ Bracha Odersky Stoutamire and Wadler and sketch a proof of type safety The extended system formalizes for the rst time some of the key features of GJ Subject areas theoretical foundations language de sign and implementation

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Welterweight Java

This paper presents Welterweight Java (WJ), a new minimal core Java calculus intended to be a suitable starting point for investigations in the semantics of Java-like programs. To this end, WJ adds a few extra pounds to Featherweight Java. WJ is imperative and stateful, which is a frequent extension of Featherweight Java. To account for the importance of concurrency, WJ models Java’s thread-bas...

متن کامل

LOOJ: Weaving LOOM into Java

LOOJ is an extension of Java obtained by adding bounded parametric polymorphism and new type expressions ThisClass and ThisType, which are similar to MyType in LOOM. Through examples we demonstrate the utility of this language even over very expressive extensions such as GJ. The LOOJ compiler generates standard JVML code and supports instanceof and casts for all types including type variables a...

متن کامل

A Core Calculus of Metaclasses

Metaclasses provide a useful mechanism for abstraction in object-oriented languages. But most languages that support metaclasses impose severe restrictions on their use. Typically, a metaclass is allowed to have only a single instance and all metaclasses are required to share a common superclass [6]. In addition, few languages that support metaclasses include a static type system, and none incl...

متن کامل

A Recipe for Raw Types

The design of GJ (Bracha, Odersky, Stoutamire and Wadler), an extension of Java with parametric polymorphism, was significantly affected by the issue of compatibility between legacy Java code and new GJ code. In particular, the introduction of raw types made it easier to interface polymorphic code with monomorphic code. In GJ, for example, a polymorphic class List, parameterized by the eleme...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999